import Vue from "vue";
import VueRouter from "vue-router";

import Index from "../views/Index/Index.vue";
const LeftTop = () => import("../views/LeftTop/LeftTop");
const LeftBottom = () => import("../views/LeftBottom/LeftBottom");
const CenterTop = () => import("../views/CenterTop/CenterTop");
const CenterBottom = () => import("../views/CenterBottom/CenterBottom");
const RightTop = () => import("../views/RightTop/RightTop");
const RightBottom = () => import("../views/RightBottom/RightBottom");

Vue.use(VueRouter);

const routes = [
    {
        path: "/index",
        name: "首页",
        meta: {
            title: "首页",
        },
        component: Index,
    },
    {
        path: "/lefttop",
        component: LeftTop,
    },
    {
        path: "/leftbottom",
        component: LeftBottom,
    },
    {
        path: "/centertop",
        component: CenterTop,
    },
    {
        path: "/centerbottom",
        component: CenterBottom,
    },
    {
        path: "/righttop",
        component: RightTop,
    },
    {
        path: "/rightbottom",
        component: RightBottom,
    },
    {
        path: "*",
        redirect: "/index",
    },
];

const router = new VueRouter({
    base: process.env.BASE_URL,
    routes,
});

export default router;
